package com.dubbo1.lib.controller;

import com.dubbo1.api.api.Dubbo1Service;
import com.dubbo1.api.dto.DubboBaseDto;
import com.dubbo1.api.dto.req.Dubbo1ParamDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/dubbo1")
public class TestController {

    @Autowired
    Dubbo1Service dubbo1Service;

    @PostMapping("/test")
    public DubboBaseDto test(@RequestBody Dubbo1ParamDto param) {
        //dubbo2服务的queryDubbo2Provide
        DubboBaseDto result = dubbo1Service.queryDubbo1Consum(param);
        return result;
    }

}
